package com.kandinfo.base.admin.service;

import java.util.List;
import java.util.Map;

import com.kandinfo.base.admin.domain.DictData;
import com.kandinfo.base.admin.enumeration.DictType;
import com.kandinfo.base.admin.repository.DictDataRepository;
import com.kandinfo.base.common.service.Service;


public interface DictDataService extends Service<DictData, Long, DictDataRepository> {
    /**
     * 根据类型获取字典列表
     * 
     * @param type
     * @return
     */
    List<DictData> getValueListByType(DictType type);

    /**
     * 根据类型获取字典Map
     * 
     * @param type
     * @return
     */
    Map<String, DictData> getValueMapByType(DictType type);

    /**
     * 获取字典
     * 
     * @param types
     * @return
     */
    Map<String, List<DictData>> getDict(DictType... types);

    String findStartdate();

    String findEnddate();

    DictData getByCode(DictType type, Object code);
    
    List<DictData> getByDefCode(String type);

}
